package com.gxa.modules.datamanagement.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxa.common.utils.PageUtils;
import com.gxa.common.utils.Query;
import com.gxa.modules.datamanagement.entity.BasicInformation;
import com.gxa.modules.datamanagement.mapper.BasicInformationMapper;
import com.gxa.modules.datamanagement.service.BasicInformationService;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.Map;
@Service
public class BasicInformationServiceImpl extends ServiceImpl<BasicInformationMapper, BasicInformation> implements BasicInformationService {

    @Override
    public PageUtils queryByPage(Map<String, Object> params) {
        String cellName = (String) params.get("cellName");

        IPage<BasicInformation> page = this.page(new Query<BasicInformation>().getPage(params),
                new QueryWrapper<BasicInformation>().like(StringUtils.isNotEmpty(cellName),"cell_name",cellName)

        );
        return new PageUtils(page);
    }
}
